Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the package-json path repo-relative #1500

Conversation

NullVoxPopuli
Copy link
Collaborator

@NullVoxPopuli NullVoxPopuli commented Jun 30, 2023

Unblocks: #1492

Today, in the release-plan.json, the pkgJSONPath is the absolute path to each package.json on the machine that ran the command last.

To allow for anyone to generate and interpret a release-plan, we need to move to repo-relative paths.

All the tools that I saw that read the pkgJSONPath will respect the current working directory -- but that would mean that the embroider-release tool can only be ran from the repo root -- so whenever the relative path is read, I converted it to an absolute path.

To test:

  • merge a pr, but don't release yet
  • run pnpm i
  • run pnpm compile --watch (or without watch)
  • run export GITHUB_AUTH=xyz (I used a classic token with repo permissions that I've since deleted)
  • run pnpm exec embroider-release explain-plan (to see what to expect in the .release-plan.json)
  • run pnpm exec embroider-release prepare (to generate / update the .release-plan.json)

Diff should look something like this:
image

@NullVoxPopuli NullVoxPopuli force-pushed the repo-relative-release-plan-paths branch from 889e098 to 33efc39 Compare July 2, 2023 16:11
@NullVoxPopuli NullVoxPopuli marked this pull request as ready for review July 2, 2023 16:13
@NullVoxPopuli NullVoxPopuli requested a review from ef4 July 2, 2023 17:37
Copy link
Member

@mansona mansona left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran the steps and it worked 🤷 I feel like this needs to be tested on main 😂 LGTM

@NullVoxPopuli NullVoxPopuli merged commit 67f82f3 into embroider-build:main Jul 5, 2023
@NullVoxPopuli NullVoxPopuli deleted the repo-relative-release-plan-paths branch July 5, 2023 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants